import request from "@/request/api";

// 查询工单资产列表
export function queryOrderAssetList(data) {
  return request({
    url: "/eam-service-system/orderAsset/query",
    method: "get",
    params: data,
  });
}

// 根据id获取工单资产
export function queryOrderAssetDetail(data) {
  const { id } = data;
  return request({
    url: `/eam-service-system/orderAsset/get/${id}`,
    method: "get",
  });
}

// 保存工单数据
export function saveOrderAssetDetail(data) {
  return request({
    url: "/eam-service-system/orderAsset/save",
    method: "post",
    data: data,
  });
}

// 更新工单数据
export function updateOrderAssetDetail(data) {
  return request({
    url: "/eam-service-system/orderAsset/update",
    method: "post",
    data: data,
  });
}

// 删除工单数据
export function deleteOrderAssetDetail(data) {
  const { id } = data;
  return request({
    url: `/eam-service-system/orderAsset/delete/${id}`,
    method: "get",
    params: data,
  });
}
